package instruments;

import collision.MainWindow;
import data.NavmeshRegion;
import java.awt.Point;

/**
 * @author sad
 */
public class VisionLineInstrument extends NewPolygonInstrument {
    int lastIndexX = -1;
    int lastIndexY = -1;
    int currentX = -1;
    int currentY = -1;

    @Override
    public void mouseDown(int x, int y, int modifiers) {
        super.mouseDown(x, y, modifiers);
        if (MainWindow.getInstance().getExtAreas().isEmpty()) {
            return;
        }
        NavmeshRegion a = MainWindow.getInstance().getExtAreas().get(0);
        Point p = new Point();
        if (a.getIndexOfCell(x, y, p)) {
            lastIndexX = currentX;
            lastIndexY = currentY;
            currentX = p.x;
            currentY = p.y;
            if (lastIndexX != -1 && lastIndexY != -1) {
            }
        }
    }
}
